<template>
    <div class="container">
		<div class="content-index">
			<!-- <div class="tui-header-center">
				<image :src="userInfo.avatarPath" class="tui-avatar" mode="aspectFill" @click="$navSkin.toDetail()"></image>
				<div class="tui-info"  @click="$navSkin.toDetail()">
					<div class="tui-nickname">{{userInfo.nickname}}</div>
					<div class="tui-explain">
						<span>关注：{{userInfo.followCount}}</span> <span>粉丝：{{userInfo.fansCount}}</span>
					</div>
				</div>
				<div class="tui-btn-edit">
					<image src="/static/icons/icon_xiaoxi.png" mode="" @click="toNotice()"></image>
					<image src="/static/icons/icon_tianjia.png" mode="" @click="$navSkin.toSearch()"></image>
				</div>
			</div> -->
			<!-- <div class="topic-header">
				<div class="left">
					<span>{{$utils.monthDate()}}&nbsp;&nbsp;&nbsp;&nbsp;{{$utils.week()}}</span>
				</div>
				<div class="right">
					<div class="userInfo">
						<image class="user-img" :src="userInfo.avatarPath" mode="aspectFill"></image>
						<div class="user-num">{{userInfo.myIndex || '000'}}</div>
					</div>
					<div class="userInfo">
						<image class="user-img" :src="userInfo.lastUpdateAvatar" mode="aspectFill"></image>
						<div class="user-num">{{userInfo.lastUpdateIndex || '000'}}</div>
					</div>
				</div>
			</div> -->
			<div class="topic-body">
				<div class="tab-content">
					<div class="tab-head">今日动态</div>
					<div class="tab-center">
						<div class="tab">
							<div :class="['tab-item',current == index?item.colorLight:'']" v-for="(item,index) in classify" v-if="index%3==0" :key="index" @click="selectTab(index,item.colorLight,item.id,item.name)">{{item.name}}</div>
						</div>
						<div class="tab">
							<div :class="['tab-item',current == index?item.colorLight:'']" v-for="(item,index) in classify" v-if="index%3==1" :key="index" @click="selectTab(index,item.colorLight,item.id,item.name)">{{item.name}}</div>
						</div>
						<div class="tab">
							<div :class="['tab-item',current == index?item.colorLight:'']" v-for="(item,index) in classify" v-if="index%3==2" :key="index" @click="selectTab(index,item.colorLight,item.id,item.name)">{{item.name}}</div>
						</div>
					</div>
				</div>
				<!-- 标签 -->
				<div class="lab-title">《{{current_typeName}}》列表</div>
				<div class="topic-center">
					<div class="topic-list">
						<div :class="[currentColor]" style="border:none" v-for="(item,index) in topicList"><div :class="['topic-item',currentColor,item.clicked?'active':'']"   v-if="index%3==0">{{item.name}}</div></div>
					</div>
					<div class="topic-list">
						<div :class="[currentColor]" style="border:none" v-for="(item,index) in topicList"><div :class="['topic-item',currentColor,item.clicked?'active':'']"   v-if="index%3==1">{{item.name}}</div></div>
					</div>
					<div class="topic-list">
						<div :class="[currentColor]"  style="border:none" v-for="(item,index) in topicList"><div :class="['topic-item',currentColor,item.clicked?'active':'']"   v-if="index%3==2">{{item.name}}</div></div>
					</div>
				</div>
				
			</div>
			<div class="submit-btn" @click="toLogin">前往登录/注册</div>
		</div>
		<uni-popup ref="confirmPopup" type="center" :maskClick="true">
			<div class="confirm-info">
				<div class="info-title">提示</div>
				<div class="info-txt">1.我要保密：以保密形式记录“<span>{{clicked_tagName}}</span>”标签</div>
				<div class="info-txt">2.撤销保密：撤销已保密的“<span>{{clicked_tagName}}</span>”标签</div>
				<div class="btn-wrap">
					<div class="btn btn-left" @click="tagCancelSecret">撤销保密</div>
					<div class="btn btn-right" @click="tagSecret">我要保密</div>
				</div>
			</div>
		</uni-popup>
		<div class="point-number-wrapper">
			<div class="point-number" :class="[currentColor]" v-show="showNumber">{{currentNumber>0? '+':''}}{{currentNumber}}</div> 
		</div>
		
    </div>
</template>

<script>
    import data from '@/js/index/visitor/data.js';
    import methods from '@/js/index/visitor/methods.js';
	import uniPopup from "@/components/uni-popup/uni-popup.vue";
    import {mapState} from 'vuex';
    export default {
        data,
        methods,
        onLoad(e) {
			// uni.setTabBarBadge({
			//   index: 0,
			//   text: '1'
			// })
			// setTimeout(()=>{this.$refs.confirmPopup.open()},1000)
			// this.current = 0
			this.getAllCategory()
        },
        onShow() {
			
			// this.getUserInfo()
		},
        onHide() {
            console.log('on hide')
        },
        onUnload() {
        },
        computed: {
        	...mapState([ 'userInfo']),
        	bgHeight() {
        		// #ifdef APP-PLUS
        		return 250
        		// #endif
        		return this.navigationBarHeight + uni.upx2px(364);
        	}
        },
	
        components: {
			uniPopup
        }
    };
</script>

<style>
   page{
   	background-color: #FFFFFF;
   }
  /* uni-page{
   	background-color: #FFFFFF;
   } */
</style>
<style scoped lang="scss">
    @import '~@/style/index/visitor.scss';
	
</style>